using System; // Add this for Guid
using DesktopApp.Models; // Add this for RuleType
using System.Windows.Input; // Add this for ICommand
using CommunityToolkit.Mvvm.ComponentModel; // Needed for ObservableProperty

namespace DesktopApp.ViewModels
{
    public partial class RuleItemViewModel : ViewModelBase
    {
        // Add a unique ID for referencing
        public Guid Id { get; } = Guid.NewGuid();

        [ObservableProperty]
        private string _name = string.Empty;

        [ObservableProperty]
        private string _description = string.Empty;

        [ObservableProperty]
        private bool _isEnabled;

        // TODO: Add properties for rule type, options, etc. if needed later

        // --- New Properties for Rule Logic ---
        [ObservableProperty]
        private RuleType _type;

        // Parameters (only relevant ones are filled based on Type)
        [ObservableProperty]
        private string? _keyword; // Used by FilterExcludes, FilterIncludes, KeywordReplace, RegexReplace

        [ObservableProperty]
        private string? _replacement; // Used by KeywordReplace, RegexReplace

        // Re-add Pattern property for Regex rules
        [ObservableProperty]
        private string? _pattern; // Used by RegexReplace

        // Add IsSelected property for manual selection tracking
        [ObservableProperty]
        private bool _isSelected;

        // --- Commands passed from parent ViewModel ---
        public ICommand? EditCommand { get; set; }
        public ICommand? DeleteCommand { get; set; }

        // Predefined rule flags (can be used instead of Type for simplicity if limited)
        // public bool IsRemoveTimestampRule { get; set; }
        // public bool IsRemoveFilePathRule { get; set; }
    }
} 